package com.wenhua.service.impl;


import com.wenhua.mapper.UserMapper;
import com.wenhua.pojo.User;
import com.wenhua.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public User selectUser(String username, String password) {

        //调用mapper层方法
        /* 实际上这里要处理麻麻加密等东西,现在测试省略了 */
        User user = userMapper.selectUserByUsernameAndPasswordHash(username, password);

        return user;
    }
}
